#!/usr/bin/perl -w

# TODO: try to use TSConfig.pm
# TODO: Change "<" and ">" to "+>"
# TODO: Handle undefined $1
# TODO: Lock files

$file = "/tmp/fc_metadata.txt";
print 'Writing metadata do file: !';
open $fh, ">", $file;
print $fh "Metadata:\n";

# Get the number of parameters (metadata fields) passed to the script
# OBS: $#ARGV is actually the index (which starts at 0) of the last element 
$md_num = $#ARGV;
for (my $count = 0; $count <= $md_num; $count++){
	print $fh $ARGV[$count]."\n";
}
close $fh;
